﻿using System;
using Autodesk.Revit.DB;

namespace HangerSupport
{
	public struct PipeSectionDef
	{
		public string SizeInfo()
		{
			string result = "";
			switch (this.m_eSecType)
			{
			case SectionType.kCircle:
				result = "D" + this.m_dWide.ToString();
				break;
			case SectionType.kRect:
				result = this.m_dWide.ToString() + "X" + this.m_dHigh.ToString();
				break;
			case SectionType.kOval:
				result = "D" + this.m_dWide.ToString() + "/" + this.m_dHigh.ToString();
				break;
			}
			return result;
		}

		public double Wide()
		{
			return this.m_dWide;
		}

		public double High()
		{
			double result = this.m_dHigh;
			bool flag = this.m_eSecType == SectionType.kCircle;
			if (flag)
			{
				result = this.m_dWide;
			}
			return result;
		}

		public double ElevationBottom()
		{
			return this.m_dElevation - this.High() / 2.0;
		}

		public double ElevationTop()
		{
			return this.m_dElevation + this.High() / 2.0;
		}

		public string m_strFamilyName;

		public double m_dWide;

		public double m_dHigh;

		public double m_dElevation;

		public ElementId m_ElementId;

		public double m_dDistX;

		public SectionType m_eSecType;

		public string m_strLevelName;

		public double m_dLevelOffset;
	}
}
